
export function checkPassword(value: string = '', name = "密码", length = 6) {
    if (value.length < length) {
        return { status: false, massage: `${name}长度必须要6位以上` }
    } else if (!/^\w+$/.test(value)) {
        return { status: false, massage: `${name}必须由数字字母下划线组成` }
    } else {
        return { status: true }
    }
}

export function checkPhoneNum(value: string = "", name = '手机号'): any {
    if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(value)) {
        return { status: false, massage: `${name}格式不正确` };
    } else {
        return { status: true };
    }
}
